package com.fowo.api.model.stock;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Data;

/** 出库单 导入导出辅助模型 */
@Data
public class StockOutExcelPo {

  @ExcelProperty(value = "出库单号")
  private String orderSn;

  @NotNull(message = "出库仓库不能为空")
  @Size(max = 50, message = "出库仓库长度不能超过20")
  @ExcelProperty(value = "*出库仓库")
  private String warehouseName;

  @ExcelIgnore
  @ExcelProperty(value = "*出库仓库")
  private Long warehouse;

  @ExcelProperty(value = "出库类型")
  private String type;

  @DateTimeFormat("yyyy年MM月dd日HH:mm:ss")
  @ExcelProperty(value = "出库时间")
  private java.util.Date outTime;

  @ExcelProperty(value = "金额")
  private String totalAmount;

  @ExcelProperty(value = "数量")
  private String totalNum;

  @ExcelProperty(value = "组织")
  private String deptName;

  @ExcelIgnore
  @ExcelProperty(value = "组织")
  private Long dept;

  @NotBlank(message = "产品类型不能为空")
  @EnumsString(
    value = { "原材料", "成品" },
    message = "产品类型的可用值为 “原材料”, “成品” 其中之一"
  )
  @ExcelProperty(value = "*产品类型")
  private String productType;

  @ExcelProperty(value = "状态")
  private String status;

  @Size(max = 500, message = "备注长度不能超过20")
  @ExcelProperty(value = "备注")
  private String remark;
}
